from typing import List
import io

def validate_file_type(filename: str, allowed_types: List[str]) -> bool:
    """验证文件类型"""
    return any(filename.lower().endswith(ext) for ext in allowed_types)

def create_bytes_io() -> io.BytesIO:
    """创建一个字节流对象"""
    return io.BytesIO() 